<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateProductPivotBodyPositionTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('product_pivot_body_position', function(Blueprint $table)
		{
			$table->integer('id', true);
			$table->integer('product_id')->index('pvt_prod_id')->comment('关联products表');
			$table->integer('body_position_id')->index('pvt_bd_pos_id')->comment('关联body_positions表');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('product_pivot_body_position');
	}

}
